<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'accountInspect.label', default: 'AccountInspect')}"/>
    <title>编辑机构年检</title>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>PLS CINDATA</li>
                    <li class="active">
                        <span>机构年检</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">

            </h2>
        </div>
    </div>
</div>

<g:if test="${flash.message}">
    <div class="message alert alert-info" role="status">${flash.message}</div>
</g:if>
<g:hasErrors bean="${this.mortgageCollectionRecord}">
    <ul class="errors" role="alert">
        <g:eachError bean="${this.mortgageCollectionRecord}" var="error">
            <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                    error="${error}"/></li>
        </g:eachError>
    </ul>
</g:hasErrors>

<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hblue">
            <div class="panel-heading">
                编辑机构年检信息
            </div>

            <div class="panel-body form-horizontal">

                <g:form action="editSave">
                    <div class="form-group">
                        <g:hiddenField name="account" value="${account?.id}"></g:hiddenField>
                        <g:hiddenField name="targetUri" value="${params?.targetUri}"></g:hiddenField>
                        <g:hiddenField name="id" value="${accountInspect?.id}"/>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">机构名称</label>
                        <div class="col-md-3">
                            <span class="cont">${account?.name}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">机构地址</label>
                        <div class="col-md-3">
                            <span class="cont">${account?.address}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">企业法人</label>
                        <div class="col-md-3">
                            <span class="cont">${account?.fullName}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">年度</label>
                        <div class="col-md-3">
                            <g:select class="form-control" name="year" id="collectionType"
                                      from="${2018..2028}"
                                      value="${accountInspect?.year}"
                                      noSelection="${['': '请选择年度']}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">年检时间</label>
                        <div class="col-md-3">
                            <span class="cont"><g:formatDate date="${accountInspect?.startTime}" format="yyyy-MM-dd"></g:formatDate></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">年检人</label>
                        <div class="col-md-3">
                            <span class="cont">${user?.fullName}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">年检到期日</label>
                        <div class="col-md-3">
                            <g:datePicker class="form-control" name="endTime" value="${accountInspect?.endTime}" precision="day"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">年检结果</label>
                        <div class="col-md-3">
                            <g:select class="form-control" name="result" id="result"
                                      from="${['通过','不通过']}"
                                      value="${accountInspect?.result}"
                                      noSelection="${['': '请选择年检结果']}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">备注</label>
                        <div class="col-md-3">
                            <g:textArea  name="memo" id="memo"  value="${accountInspect?.memo}" class="form-control textarea" rows="5" cols="5"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-5 control-label ">工作流</label>
                        <div class="col-md-3">
                            <g:select class="form-control m-b" name="workflow" id="workflow" from="${com.cindata.Workflow.findAllByType(com.cindata.dictionary.WorkflowType.findByName('机构'))}" optionValue="name" optionKey="id" noSelection="${['': '请选择工作流']}" value="${accountInspect?.workflow?.id}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-2 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="save" value="保存"/>
                        </div>
                    </div>
                </g:form>
            </div>

        </div>
    </div>
</div>





</body>
</html>
